package ZhangHeng.com.shengXuLianbiao;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

class Node{
    int data;
    Node next;

    public Node(int e){
        this.data=e;
    }
}
class MyList{
    Node head;
    public MyList(){

    }

    public void insert(int e){
        Node newNode = new Node(e);
        newNode.next=head.next;
        head.next=newNode;

    }
}

public class shengXu2 {
    public static void main(String []args){
        MyList l = new MyList();
        l.insert(1);
        l.insert(1);
        l.insert(1);
        l.insert(1);

        System.out.println(l);


    }
}
